package id.game;

import java.util.ArrayList;
import java.util.Random;

public class ResourcePool {

	private ArrayList<Resource> pool;

	public ResourcePool() {
		pool = new ArrayList<Resource>();
	}

	public ArrayList<Resource> getPool() {
		return pool;
	}

	public Resource getRandomResource() {
		Random randomGenerator = new Random();
		int randomInt = randomGenerator.nextInt(pool.size());
		return pool.get(randomInt);
	}

	public void addToPool(Resource resource) {
		this.pool.add(resource);
	}

}
